<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<html>
<head>
    <%@include file="/include/header.html" %>
    <link rel="stylesheet" href="${ctx}/statics/css/update.css">
    <link rel="stylesheet" href="${ctx}/statics/css/common.css">
    <link rel="stylesheet" href="${ctx}/statics/css/blanceDrop.css">
    <script type="text/javascript" src="${ctx}/appjs/acct/acctWithdrawApply.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/skins/laydate.css">
    <link rel="stylesheet" href="${ctx}/libjs/plugins/laydate/laydate.css">
    <script src="${ctx}/libjs/plugins/laydate/laydate.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.css">
    <script src="${ctx}/libjs/plugins/bootstrap-table-pagejump/bootstrap-table-pagejump.js"></script>
    <link rel="stylesheet" href="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.css">
    <script src="${ctx}/libjs/plugins/bootStrap-table-fixed-column/bootstrap-table-fixed-columns.js"></script>
</head>

<script type="text/javascript">
    $('#topLink', window.parent.document).html(function (i, origText) {
        return '<ol class="breadcrumb">' +
            '<li class="breadcrumb-item">' +
            '<a href="">主页</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a>分销商列表</a>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<strong>分销商提现审核</strong>' +
            '</li>' +
            '<li class="breadcrumb-item">' +
            '<a href="javascript:window.history.back()"><i class="fa fa-times"></i> 返回</a>' +
            '</li>' +
            '</ol>';
    });

    var has_add = '';
    var has_edit = '';
    var has_delete = '';
</script>

<body class="gray-bg">
<div class="wrapper wrapper-content ">
    <div class="col-sm-12">
        <div class="ibox">
            <div class="ibox-body">
                <div class="row">
                    <input type="hidden" name="tenantOperatorCode" id="tenantOperatorCode"
                           value="${tenantOperatorCode}">
                    <input id="operatorName" name="operatorName" type="text"
                           class="form-control shortInput input-distance"
                           placeholder="分销商名称">
                    <input id="loginName" name="loginName" type="text" class="form-control shortInput input-distance"
                           placeholder="分销商账号">
                    <input id="outTradeNo" name="outTradeNo" type="text" class="form-control shortInput input-distance"
                           placeholder="交易订单号">
                    <input id="stationName" name="stationName" type="text"
                           class="form-control shortInput input-distance"
                           placeholder="站点名称">
                    <select name="status" id="status" class="form-control shortInput input-distance">
                        <option value="">状态</option>
                        <option value="0">待审核</option>
                        <%--<option value="1">已处理</option>--%>
                        <option value="2">驳回</option>
                        <%--<option value="3">提现中</option>--%>
                        <option value="4">已到账</option>
                        <option value="5">提现失败</option>
                    </select>
                    <button class="btn btn-success input-distance" style="margin-top: 0"
                            onclick="acctWithdrawApply.reLoad()">查询
                    </button>
                    <button type="button" class="btn btn-success marginright-auto input-distance" style="margin-top: 0"
                            onclick="acctWithdrawApply.exportAcctWithdrawApply()">
                        导出
                    </button>
                </div>
                <table id="exampleTable" data-mobile-responsive="true">
                </table>
                <div class="invoiceModal" id="invoiceModal" style="display: none">
                    <div class="contentBlock" style="overflow: auto">
                        <div style="height: 500px;width: auto;overflow: auto" class="hide imgWrap">
                            <img src="" alt="" style="width: 100% !important;">
                        </div>
                        <iframe id="myFrameId" name="myFrameName"
                                src=""
                                scrolling="no" frameborder="0"></iframe>
                        <ul>

                        </ul>
                    </div>
                </div>

                <%--  驳回理由  --%>
                <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog"
                     aria-labelledby="exampleModalLabel">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                        aria-hidden="true"></span></button>
                                <h4 class="modal-title" id="exampleModalLabel" data-dismiss="modal" aria-label="Close">
                                    关闭</h4>
                            </div>
                            <div class="modal-body">
                                <form id="contentForm" class="layui-form">
                                    <div class="form-group row">
                                        <label class="col-sm-4 col-form-label text-right">请输入驳回理由:</label>
                                        <div class="col-sm-8">
                                            <textarea class="form-control" id="rejectRemark" name="rejectRemark"
                                                      style="height: 80%"></textarea>
                                        </div>
                                    </div>
                                </form>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default" id="cancelBtn" data-dismiss="modal">取消</button>
                                <button type="button" class="btn btn-success" id="submitForm">确认</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    acctWithdrawApply.init();
    $(".invoiceModal").on("click", "ul li", function () {
        var url = $(this).attr("href");
        var name = $(this).find(".fileLink").find("div").html();
        if (url.indexOf("pdf") > 0) {
            $("#myFrameId").attr("src", url);
            $(".imgWrap").addClass("hide");
            $("#myFrameId").removeClass("hide");
            $(".layui-layer-title").html("发票预览（" + name + "）");
        } else {
            $(".imgWrap").removeClass("hide");
            $(".imgWrap img").attr("src", url);
            $("#myFrameId").addClass("hide");
            $(".layui-layer-title").html("发票预览（" + name + "）");
        }
    });

    $("#cancelBtn").click(function () {
        $("#rejectRemark").val("");
    })


</script>
</body>
</html>